package svc

import (
	"delivery/api/internal/config"
	"delivery/deliveryrpc/deliveryrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config      config.Config
	DeliveryRpc deliveryrpcclient.Deliveryrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:      c,
		DeliveryRpc: deliveryrpcclient.NewDeliveryrpc(zrpc.MustNewClient(c.DeliveryRpc)),
	}
}
